
import { createRouter, createWebHashHistory,createWebHistory } from 'vue-router'
import DownApp from '../views/DownApp.vue'

//1、编写路由源配置 ， 定义path  和 vue组件存放的位置

const routes =[
    {
        path:'/',
        name:'movecar',
        component:()=>import('../views/Movecar.vue')
    },
    {
        path:'/downapp',
        name:'downapp',
        component:DownApp
    },
    {
        path:'/searchs',
        name:'searchs',
        component:()=> import('../views/Searchs.vue')
    },
    {
        path:'/toplist',
        name:'toplist',
        component:()=> import('../views/iconcats/Toplist.vue'),
        meta:{title:'排行榜'}
    },
    {
        path:'/persche',
        name:'persche',
        component:()=> import('../views/iconcats/Persche.vue'),
        meta:{title:'二手车'}
    },
    {
        path:'/videoplay',
        name:'videoplay',
        component:()=> import('../views/VideoPlay.vue'),
        meta:{title:'视频播放'}
    }
]

// 2、 创建路由的实例， 传入路由配置
const router = createRouter({
    history:createWebHistory(),
    routes
})

//3、导出路由
export default router

